package com.ithema.mArrayList;

import java.util.Random;

public class Testl {
    public static void main(String[] args) {
       int arr1[]=new int[5];
       int arr2[]=new  int[2];
        Random r=new Random();
        int count1=0;
        int count2=0;
        for (int i = 0; i < arr1.length; i++) {
             arr1[i] = r.nextInt(9)+1;
        }
        for (int i = 0; i < arr1.length; i++) {
            if(arr1[i]%3==0){
               count1++;
            }
            if(arr1[i]%2==0){
                count2++;
            }
        }
        arr2[0]=count2;
        arr2[1]=count1;
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }
    }
}
